Make string_view work with -fno-exceptions and get tests passing. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@271237 91177308-0d34-0410-b5e6-96231b3b80d8 
diff --git a/include/experimental/string_view b/include/experimental/string_view index 93f77f3..0a7239b 100644 --- a/include/experimental/string_view +++ b/include/experimental/string_view 
@@ -180,6 +180,7 @@  #include <algorithm>  #include <iterator>  #include <ostream> +#include <stdexcept>  #include <iomanip>    #include <__debug> @@ -280,7 +281,7 @@  const_reference at(size_type __pos) const  {  return __pos >= size() - ? (throw out_of_range("string_view::at"), __data[0]) + ? (__libcpp_throw(out_of_range("string_view::at")), __data[0])  : __data[__pos];  }   @@ -351,7 +352,7 @@  size_type copy(_CharT* __s, size_type __n, size_type __pos = 0) const  {  if ( __pos > size()) - throw out_of_range("string_view::copy"); + __libcpp_throw(out_of_range("string_view::copy"));  size_type __rlen = _VSTD::min( __n, size() - __pos );  _VSTD::copy_n(begin() + __pos, __rlen, __s );  return __rlen; @@ -365,7 +366,7 @@  // size_type __rlen = _VSTD::min( __n, size() - __pos );  // return basic_string_view(data() + __pos, __rlen);  return __pos > size() - ? throw out_of_range("string_view::substr") + ? (__libcpp_throw((out_of_range("string_view::substr"))), basic_string_view())  : basic_string_view(data() + __pos, _VSTD::min(__n, size() - __pos));  }